Cookiecutter
Table of Content
Cookiecutter uses Jinja2 templating system
cookiecutter.json#
private variables#
cookiecutter.json can contain private variables that user won’t be required to fill.
Conditionals#
cookiecutter.json
{
"pytest_enabled": [
"y",
"n"
]
}
requirements_dev.txt
mkdocs
{%- if cookiecutter.pytest_enabled == 'y' %}
pytest
{%- endif %}
jinja remove empty line
Add - after % to remove jinja empty lines
for variable settings if and for loops
cookiecutter privates#
_copy_without_render#
list of file/ directories to copy without render
```json title=”cookiecutter.json” { “_copy_without_render”: [ “README.md” ] }